AB de Villiers' brilliant knock helped Royal Challengers Bangalore beat Kings XI Punjab by four wickets in the Indian Premier League (IPL) match here in Bengaluru.